package com.ajie.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.tags.Tag;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 权限表;
 * @author: ajie
 * @date : 2024-7-13
 */
@Data
@Tag(name = "权限表")
@TableName("sys_permission")
@EqualsAndHashCode(callSuper = false)
public class SysPermission extends BaseEntity {

    @Schema(title = "类型", description = "0父级菜单1子级菜单2权限")
    private Integer type;

    @Schema(title = "父级菜单", description = "")
    private String parentId;

    @Schema(title = "浏览器显示地址", description = "")
    private String path;

    @Schema(title = "名称", description = "")
    private String name;

    @Schema(title = "国际化名称", description = "")
    private String englishName;

    @Schema(title = "编码", description = "菜单路径、外链url、权限code")
    private String code;

    @Schema(title = "外链", description = "0否1是")
    private Integer outerChain;

    @Schema(title = "图标", description = "")
    private String icon;

    @Schema(title = "排序", description = "")
    private Integer sort;

    @TableField(exist = false)
    @Schema(description = "子级菜单或权限")
    private List<SysPermission> children;

    @TableField(exist = false)
    @Schema(title = "是否处理子级关系", description = "默认不处理")
    private boolean tree = false;

    @TableField(exist = false)
    @Schema(description = "tree名称")
    private String label;

    @TableField(exist = false)
    @Schema(description = "tree选择值")
    private String value;
}